<?php
// http://www.12301.cc/release.html?pid=15642
// http://www.12301.cc/release.html?pid=15643|15644
// http://www.12301.cc/call/release.php?type=add&id=113,3614,60&title=cccc

include_once("/var/www/html/new/com.inc.php");
include_once("/var/www/html/new/d/class/abc/Product.class.php");

if(!isset($_SESSION['sid'])) exit('<script>alert("登陆过期");</script>');

$ac = $GLOBALS['_ac'];
$pw = $GLOBALS['_pw'];
$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));

$pids = explode('|', $_REQUEST['pid']);
foreach($pids as $pid){
	
	$price = abc777\Product::Price($s, $pid, $_SESSION['sid'], date('Y-m-d'), 0);// 获取分销商
	
	$key = 'p'.$pid;
	$conf_lists = $_REQUEST[$key];
	$conf_lists = array_filter($conf_lists);
	foreach($conf_lists as $pid=>$ps){
		if(($ps - $price['js'])<0) exit('<script>alert("价格配置不正确");</script>');
	}
	
}

print_r($_REQUEST);